<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <base href="<%=basePath%>">

    <title>菜单列表</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->

    <link rel="stylesheet" href="/zTree/css/demo.css" type="text/css"></link>
    <link rel="stylesheet" href="/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css"></link>
    <script type="text/javascript" src="/zTree/js/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="/zTree/js/jquery.ztree.core.js"></script></head>
<script type="text/javascript">

    var setting = {

        callback: {
            beforeClick: function(treeId, treeNode) {
                var zTree = $.fn.zTree.getZTreeObj("tree");
                if (treeNode.isParent) {
                    zTree.expandNode(treeNode);
                    return false;
                } else {
                    demoIframe.attr("src",treeNode.file + ".html");
                    return true;
                }
            }
        }
    };

    var setting = {
        view: {
            dblClickExpand: false,
            showLine: true,
            selectedMulti: false
        },
        data: {
            simpleData: {
                enable:true,
                idKey: "id",
                pIdKey: "pId",
                rootPId: ""
            }
        },
    };
    $(function(){
        $.post(
            "menulist",
            function(obj){
                $.fn.zTree.init($("#left") , setting , obj);
            },
            "json"
        );
    });
</script>
<style type="text/css">
    .left {
        width: 20%;
        height: 530px;
        border: 1px solid #ccc;
    }
    .right {
        width: 79%;
        height: 530px;
        border: 1px solid #ccc;
    }
</style>
<body>
<h1></h1>
<div class="content_wrap">
    <div class="left">
        <ul class="ztree" id="left"></ul>
    </div>
    <div class="right">
        <iframe name="right" id="right" width="1300px" height="530px"></iframe>
    </div>
</div>
</body>
</html>